﻿using System;
using System.Collections.Generic;
using System.Text;

namespace MgSoft.Import.Exchange.ExWebApi.Db.Dtos
{
    public class SyncDataDto
    {
        public long Id { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>

        public DateTime? CreateTime { get; set; }

        /// <summary>
        /// 第一次同步成功时间
        /// </summary>

        public DateTime? FirstSyncSucceTime { get; set; }

        /// <summary>
        /// 最后一次同步成功时间
        /// </summary>
        public DateTime? LastSyncSucceTime { get; set; }

        /// <summary>
        /// 0已同步，1新增，2更新，-1停止
        /// </summary>
        public StateEnum State { get; set; }

        /// <summary>
        /// 是否报错
        /// </summary>
        public bool IsSyncError { get; set; }

        /// <summary>
        /// 错误消息
        /// </summary>
        public string ErrorMessage { get; set; }

        /// <summary>
        /// 错误堆栈
        /// </summary>
        public string ErrorStackTrace { get; set; }

        /// <summary>
        /// 同步次数
        /// </summary>
        public int SyncCount { get; set; }

        /// <summary>
        /// Date
        /// </summary>
        public DateTime? SyncTime { get; set; }

        /// <summary>
        /// 同步花费时间，单位毫秒
        /// </summary>
        public long CostTime { get; set; }

        /// <summary>
        /// 组织编码，用于数据隔离
        /// </summary>
        public string OrgNumber { get; set; }

        /// <summary>
        /// 业务关键字段
        /// </summary>
        public string Biz_KeyField { get; set; }
        #region 业务关键字段集
        public string Biz_KeyField1 { get; set; }
        public string Biz_KeyField2 { get; set; }
        public string Biz_KeyField3 { get; set; }
        public string Biz_KeyField4 { get; set; }
        public string Biz_KeyField5 { get; set; }
        public string Biz_KeyField6 { get; set; }
        public string Biz_KeyField7 { get; set; }
        public string Biz_KeyField8 { get; set; }
        public string Biz_KeyField9 { get; set; }
        #endregion

        /// <summary>
        /// Json数据包
        /// </summary>
        public string Biz_JsonData { get; set; }

        /// <summary>
        /// 业务数据，业务日期
        /// </summary>
        public DateTime? Biz_Date { get; set; }

        /// <summary>
        /// 数据特征标识，使用该标识判断是否更新
        /// </summary>
        public string Biz_UpdateField { get; set; }

        /// <summary>
        /// 单据类型
        /// </summary>
        public string Biz_BillType { get; set; }

        /// <summary>
        /// 单据类型名称
        /// </summary>
        public string Biz_BillTypeName { get; set; }

        /// <summary>
        /// 最后一次数据更新时间
        /// </summary>
        public DateTime? LastUpdateTime { get; set; }
    }
}
